sum of prime number in the input in python